<template>
	<view :style="skin" class="content audit" >
		<view v-if="isAudit">
			<view class="tips">
				<text class="iconfont icon-a-mingchengcheckbox-circle-line icon"></text>
				<text class="characters">{{$t('login.AdminReview')}}</text>
			</view>
			
			<view class="btnModule" v-if="regRole == 1">
				<!-- <u-button color="var(--subjectColor)" :disabled="true">等待审核
				</u-button> -->
				<u-button  color="var(--subjectColor)"  @click="toLogin">{{$t('login.back')}}
				</u-button>
			</view>
			<view class="btnModule" v-else>
				<u-button  color="var(--subjectColor)"  @click="goBack">{{$t('login.HomePage')}}
				</u-button>
			</view>
		</view>
		
		<view v-else>
			<view class="tips">
				<text class="iconfont icon-a-mingchengcheckbox-circle-line icon"></text>
				<text class="characters">Congratulations on your certification as a valued agent</text>
			</view>
			
			<view class="btnModule">
				<u-button color="var(--subjectColor)" @click="toLogin">Go and log in
				</u-button>
		
			</view>
		</view>
		
	</view>
</template>

<script>
	import {
		mapState
	} from 'vuex'
	export default {
		data() {
			return {
				isAudit:true,
				regRole:''
			};
		},
		computed: {
			...mapState({
				skin: state => state.theme.skin
			})
		
		},
		onLoad(options) {
			this.regRole = options.regRole
		},
		methods:{
			toLogin(){
				uni.removeStorageSync('userObj')
				uni.navigateTo({
					url:'/pages/login/login'
				})
			},
			goBack(){
				uni.removeStorageSync('userObj')
				uni.switchTab({
					url:'/pages/home/home'
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
.audit{
	padding: 16px;
	box-sizing: border-box;
	.tips{
		width: 100%;
		height: 100px;
		margin-top: 60px;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: space-evenly;
		.icon{
			font-size: 40px;
			color: var(--subjectColor);
		}
		.characters{
			font-size: 16px;
			font-weight: 600;
			display: block;
			width: 150px;
			text-align: center;
			margin-top: 16px;
		}
		
	}
	
	.btnModule {
		width: 300px;
		height: 44px;
		box-sizing: border-box;
		margin-top: 16px;
		padding: 16px;
		box-sizing: border-box;
		position: fixed;
		bottom: 100px;
		left: 30px;
	}
}
</style>
